Declare Function PPFontFam Lib "PPFONT.DLL" (ByVal hwnd As Integer, alf As NEWLOGFONT, atm As NEWTEXTMETRIC, aft As Integer) As Integer
Declare Function PPFontFamNum Lib "PPFONT.DLL" (ByVal hwnd As Integer) As Integer
Declare Function PPFont Lib "PPFONT.DLL" (ByVal hwnd As Integer, alf As NEWLOGFONT, atm As NEWTEXTMETRIC, aft As Integer, ByVal afamily As String) As Integer
Declare Function PPFontNum Lib "PPFONT.DLL" (ByVal hwnd As Integer, ByVal afamily As String) As Integer
where: hWnd ................ is a window handle
alf ................ is an array of logical font
structure as defined in
PPGLOBAL.TXT
atm ................ is an array of text metric
(physical font) structures
as defined in PPGLOBAL.TXT
aft ................ is an array of integers which
will receive the font type
(truetype, vector, raster, device)
afamily ............. is a string variable which
contains the font family name
for which font info is desired
NOTE: the NEWTEXTMETRIC and NEWLOGFONT structures are detailed
in the windows SDK. Look there for a explanation of the
fields in them. The layouts are included here in PPGLOBAL.TXT
and PPFONT.TXT, as are relevant variable declarations.
======================== Visual Basic Example Usage ===================
--------------------------------- font family info --------------------
Static lf() As NEWLOGFONT
Static tm() As NEWTEXTMETRIC
Static ftype() As Integer
n = PPFontFamNum(hwnd) ' get number of families
ReDim lf(n), tm(n), ftype(n)
i = PPFontFam(hwnd, lf(1), tm(1), ftype(1)) ' get families